<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>函数-反转数组</title>
		<script>
			function reverse(arr){
				var newArr=[];
				for(var i = arr.length-1;i>=0;i--){
					newArr[newArr.length]=arr[i];
				}
				return newArr;
			}
			var arr=reverse([1,3,4,6,9]);
			console.log(arr);
		</script>
	</head>
	<body>
		
	</body>
</html>
